/*eslint no-unused-vars: ["warn", {"args": "after-used"}]*/
/*eslint no-mixed-spaces-and-tabs: ["warn"]*/
!(function(win) {
	//flexable.js判断是ios或者android的方法
	var isAndroid = win.navigator.appVersion.match(/android/gi);
	var isIOS = win.navigator.appVersion.match(/iphone|ipad/gi);
	var el_downLoadBtn = document.querySelectorAll('.js-download-btn');
	var downLoadUrl = {
		iphone: 'http://sw.bos.baidu.com/sw-search-sp/software/b2dd2f4e9506d/Baidu_Setup_6676_3.3.0.3153_10000001.exe',
		android: 'http://sw.bos.baidu.com/sw-search-sp/software/b2dd2f4e9506d/Baidu_Setup_6676_3.3.0.3153_10000001.exe',
	};
	// 设置了viewport以后,移动端click现在是没有300ms的延迟了
	for(var i = 0, len = el_downLoadBtn.length; i < len; i++) {
		el_downLoadBtn[i].addEventListener('click', function() {
			if(isIOS) {
				window.location.href = downLoadUrl.iphone;
			} else {
				window.location.href = downLoadUrl.android;
			}
		});
	}

})(window);